﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Kenly.DBFramework.Gateway
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class PagingResult<T> : PagingResult
    {

        /// <summary>
        /// 
        /// </summary>
        public IList<T> Entities
        {
            get;
            private set;
        }


        /// <summary>
        /// 
        /// </summary>
        public PagingResult()
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="pagingEntities"></param>
        public PagingResult(IList<T> pagingEntities)
        {
            this.Entities = pagingEntities;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="pagingArg"></param>
        public PagingResult(PagingArg pagingArg):base(pagingArg)
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="pagingArg"></param>
        /// <param name="pagingEntities"></param>
        public PagingResult(PagingArg pagingArg,IList<T> pagingEntities)
            : base(pagingArg)
        {
            if (pagingArg == null)
            {
                return;
            }

            this.Entities = pagingEntities;
        }


    }
}
